<?php
/**
 * Created by PhpStorm.
 * User: 氓羽
 * Date: 2018-3-31
 * Time: 11:28
 */
namespace Computer;


//构造方法
class Computer{
    public function __construct()
    {
        echo "主板就绪";
        echo "CPU就绪";
        echo "内存就绪";
    }

    public function game(){
        echo '--玩游戏--';
    }

}

$computer = new Computer();
$computer->game();

class Computer_play{
    public function game(){
        echo 'Play Computer Games';
    }

    public function __destruct()
    {
        // TODO: Implement __destruct() method.
        echo 'Bye';
    }
}


$computer1 = new Computer_play();
$computer1->game();


